package FirstWork;

import java.util.Scanner;

public class ManAge {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入一个年龄");
        int age = scanner.nextInt();
        ManIs(age);
    }
    public static  void ManIs(int age){
        if(age<=0||age>=120){
            throw new RuntimeException("你输的啥玩意儿？");
        }else if (age<=18){
            System.out.println("青年");
        }else if (age<=55){
            System.out.println("壮年");
        }else{
            System.out.println("老年");
        }
    }
}
